package org.massdgames.thunder.server.domain;

import java.io.IOException;
import java.util.ArrayList;

import com.google.inject.Inject;

public class DeckSet {

    private HeroDeck heroDeck;
    private DungeonDeck dungeonDeck;
    private VillageDeck villageDeck;
    private FeatureDeck featureDeck;
    private GuardianDeck guardianDeck;
    private ThunderstoneDeck thunderstoneDeck;
    
    @Inject
    public DeckSet(HeroDeck heroDeck, DungeonDeck dungeonDeck, VillageDeck villageDeck, FeatureDeck featureDeck, GuardianDeck guardianDeck, ThunderstoneDeck thunderStoneDeck) {
        this.heroDeck = heroDeck;
        this.dungeonDeck = dungeonDeck;
        this.villageDeck = villageDeck;
        this.featureDeck = featureDeck;
        this.guardianDeck = guardianDeck;
        this.thunderstoneDeck = thunderStoneDeck;
    }
    
    public HeroDeck getHeroDeck() {
        return heroDeck;
    }
    public void setHeroDeck(HeroDeck heroDeck) {
        this.heroDeck = heroDeck;
    }
    public DungeonDeck getDungeonDeck() {
        return dungeonDeck;
    }
    public void setDungeonDeck(DungeonDeck dungeonDeck) {
        this.dungeonDeck = dungeonDeck;
    }
    public VillageDeck getVillageDeck() {
        return villageDeck;
    }
    public void setVillageDeck(VillageDeck villageDeck) {
        this.villageDeck = villageDeck;
    }
    public FeatureDeck getFeatureDeck() {
        return featureDeck;
    }
    public void setFeatureDeck(FeatureDeck featureDeck) {
        this.featureDeck = featureDeck;
    }
    
    public ArrayList<Card> getHeroCards() {
        return heroDeck.getCards();
    }
    
    public ArrayList<Card> getVillageCards() {
        return villageDeck.getCards();
    }
    
    public ArrayList<Card> getDungeonCards() {
        return dungeonDeck.getCards();
    }
    @Override
    public String toString() {
        return "heroCards: " + heroDeck.getSize() + ", dungeonCards: " + dungeonDeck.getSize() + ", villageCards: " + villageDeck.getSize();
    }
    
    public void loadAll() throws IOException {
        this.dungeonDeck.load();
        this.heroDeck.load();
        this.villageDeck.load();
        this.featureDeck.load();
        this.guardianDeck.load();
        this.thunderstoneDeck.load();
    }
    public GuardianDeck getGuardianDeck() {
        return guardianDeck;
    }
    public ThunderstoneDeck getThunderstoneDeck() {
        return thunderstoneDeck;
    }
    
    
}
